package cyou.breathe.blog.user.infrastructure.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cyou.breathe.blog.user.domain.entity.User;
import jakarta.validation.constraints.NotNull;
import org.apache.ibatis.annotations.Mapper;

/**
 * @author: breathe
 * @createTime: 2025-08-27
 */
@Mapper
public interface UserMapper extends BaseMapper<User> {

    User findByNickName(@NotNull String nickName);

    User findByInviteCode(@NotNull String inviteCode);

    User findByTelephone(@NotNull String telephone);

    User findByEmail(String email);

    User findById(Long userId);

    User findByTelephoneAndPassword(String phone, String password);

    User findByEmailAndPassword(String email, String password);

}
